home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_lag_shiphatch.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
3KB
|
122 lines
# Jones 3D Cog Script
#
# lag_shiphatch.cog
#
# Locked Ships Rotating Door Script
#
# [DS]
#
# (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
#
# =======================================================================================
symbols
message startup
message activate
thing hatch0
thing trigger
thing indyactor
thing campos
thing inviso_hatch
thing inviso_hatch2
surface catch0
surface catch1
surface catch2
surface stop_face
cog hints #send message when complete.
thing player local
int open=1 local
int curcam local
int hatchsnd local
keyframe in_smack=0in_uw_hammer.key local
keyframe in_open=0in_swim_openhatch.key local
keyframe in_nope=in_uw_pickup_noput.key local
sound opensnd=lag_rustydoor_c.wav local
sound smakit=lag_hammer_uw.wav local
sound breakit=lag_propbreak_c.wav local
# --------- Hammer hand ---------------------
model hammerhnd=hand_in_hammer.3do local
int swapRef local
end
# ========================================================================================
code
startup:
sleep(0.1);
player = GetLocalPlayerThing();
SetCollideType(inviso_hatch, 0);
SetCollideType(inviso_hatch2, 0);
return;
activate:
if(open == 0) return;
if(GetSenderRef() != trigger) return;
curCam = GetCurrentCamera();
if (GetCurItem(player) == 93) #hammer.
{
SetThingFlags(player, 0x80000);
SetActorFlags(player, 0x200000);
CopyPlayerHolsters(player, indyactor);
StartCutscene(1);
# Put the hammer in Indy's hand (15 is his right hand mesh)
swapRef = SetThingMesh(indyactor, 15, hammerhnd, 0);
ClearThingFlags(indyactor, 0x80000);
SetCameraLookInterp(2, 0); # turns off interp to lookthing.
SetCameraFocus(2, campos);
SetCameraSecondaryFocus(2, indyactor);
SetCurrentCamera(2);
SetCameraFOV(90, 0, 0); # makes sure set to default.
PlayKey(indyactor, in_smack, 4, 0x12, 0);
sleep(1.5);
PlaySoundThing(smakit, trigger, 1.0, 25, 50, 0);
sleep(1.0);
PlaySoundThing(smakit, trigger, 1.0, 25, 50, 0);
sleep(1.0);
PlaySoundThing(smakit, trigger, 1.0, 25, 50, 0);
sleep(0.5);
PlaySoundThing(breakit, trigger, 1.0, 15, 30, 0);
DestroyThing(trigger);
SetAdjoinFlags(stop_face, 2);
hatchsnd = PlaySoundThing(opensnd, hatch0, 1.0, 4, 12, 0);
PlayKey(indyactor, in_open, 4, 0x12, 0);
Rotate(hatch0, -100, 2, 1);
SetCollideType(hatch0, 0);
SetCollideType(inviso_hatch, 3);
SetCollideType(inviso_hatch2, 3);
SetSurfaceFlags(catch0, 0x2000000); #water climbout ledge.
SetSurfaceFlags(catch1, 0x2000000); #water climbout ledge.
SetSurfaceFlags(catch2, 0x2000000); #water climbout ledge.
WaitForSound(hatchsnd);
CopyOrientAndPos(indyactor, player);
EndCutscene();
SetCurrentCamera(curCam);
SetThingFlags(indyactor, 0x80000);
ClearActorFlags(player, 0x200000);
ClearThingFlags(player, 0x80000);
SendMessage(hints, user2);
open = 0;
return;
}
else
{
Print("It's rusted shut");
SetActorFlags(player, 0x200000);
PlayKey(player, in_nope, 4, 0x12, 1);
ClearActorFlags(player, 0x200000);
return;
}
end